using System.Collections;
using UnityEngine;

public class HUD_TargetingCircle : MonoBehaviour
{
	public Transform tf;

	private Animator AT_Character;

	public void Init(Transform TF_Target)
	{
		AT_Character = ((!TF_Target.name.Contains("Center bone")) ? null : TF_Target.parent.GetComponent<Animator>());
		StartCoroutine(IE_Show(TF_Target));
	}

	private IEnumerator IE_Show(Transform TF_Target)
	{
		while (TF_Target != null)
		{
			tf.position = TF_Target.position;
			if (AT_Character != null && !AT_Character.enabled)
			{
				break;
			}
			yield return new WaitForFixedUpdate();
		}
		base.gameObject.SetActive(false);
	}
}
